Added enhancements on top of Calling Server preview 1#21686
Conversation
…tity with alternateCallerId, other fixes
|
This pull request is protected by Check Enforcer. What is Check Enforcer?Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass. Why am I getting this message?You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged. What should I do now?If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows: What if I am onboarding a new service?Often, new services do not have validation pipelines associated with them. In order to bootstrap pipelines for a new service, please perform following steps: For data-plane/track 2 SDKs Issue the following command as a pull request comment:
For track 1 management-plane SDKsPlease open a separate PR and to your service SDK path in this file. Once that PR has been merged, you can re-run the pipeline to trigger the verification. |
| /// </summary> | ||
| /// <returns>The instrumented <see cref="CallClient" />.</returns> | ||
| protected CallClient CreateInstrumentedCallingServerClient() | ||
| /// <returns>The instrumented <see cref="CallConnection" />.</returns> |
There was a problem hiding this comment.
I think the return should be CallingServerClient
| To get started you'll need a Communication Service Resource. See [README][README] for prerequisites and instructions. | ||
|
|
||
| ## Creating an `ServerCallingClient` | ||
| ## Creating an `CallingServerClient` |
| options: createCallOption // The options for creating a call. | ||
| ); | ||
| Console.WriteLine($"Call Leg id: {createCallResponse.CallLegId}"); | ||
| Console.WriteLine($"Call connection id: {callConnection.Value.CallConnectionId}"); |
There was a problem hiding this comment.
Apis are returning Response object which kind of wrapped http response object. The Value property contain the return value.
There was a problem hiding this comment.
then variable should be named differently - something like callConnectionResponse
…er-preview1-enhancement
* Clean up clients comments. * Update Snippet and Export-API.
…github.com/Azure/azure-sdk-for-net into feature/callingServer-preview1-enhancement
* Update Snippet and Export-API. * remove calloption override in servercall client. * Nit for params and arguments handling. * Merge Downloader updates. * Merge Downloader updates test cases. * Update AutoGen Content.
| @@ -46,9 +46,9 @@ protected async Task SleepIfNotInPlaybackModeAsync() | |||
| await Task.Delay(10000); | |||
There was a problem hiding this comment.
Why is there a delay here?
There was a problem hiding this comment.
There are few Tests in Record mode required human interaction(i.e. pick up the call to let the call in established state, so that further Api operations can be performed).
Alternative ways is using debug break point.
There was a problem hiding this comment.
👍. You can renaming the method then to WaitToPickUpPhoneInPlaybackModeAsync to make it more clear
…d of Response), fixes based on comments (#21790)
* Update Snippet and Export-API. * remove calloption override in servercall client. * Nit for params and arguments handling. * Merge Downloader updates. * Merge Downloader updates test cases. * Update AutoGen Content. * Nit clean on Unit Tests. * Updating and renaming.
InviteParticipants --> AddParticipant
InviteParticipantResultEvent --> AddParticipantResultEvent
CallModality --> MediaType
CommunicationParticipant --> CallParticipant
Id in PlayAudioResult & CancelAllMediaOperations is now called OperationId
CallConnectionState now has {incoming, connecting, connected, disconnecting, disconnected}
CallRecordingStateResult ---> CallRecording... by Naveed Ali
CallRecordingStateResult ---> CallRecordingProperties
…github.com/Azure/azure-sdk-for-net into feature/callingServer-preview1-enhancement
…gger path (#21870) * Added AddParticipantResult, Re-added communication error, updated swagger path * Fixed unit tests * Updated netstandard
* Update Snippet and Export-API. * remove calloption override in servercall client. * Nit for params and arguments handling. * Merge Downloader updates. * Merge Downloader updates test cases. * Update AutoGen Content. * Nit clean on Unit Tests. * Updating and renaming. * Test update. * Add Call Connection Live Tests. * Add ServerCall Live Tests * Increase Test Coverage. * Reenable sample tests. * Address comments. * Point to swagger file in master branch.
* Update Snippet and Export-API. * remove calloption override in servercall client. * Nit for params and arguments handling. * Merge Downloader updates. * Merge Downloader updates test cases. * Update AutoGen Content. * Nit clean on Unit Tests. * Updating and renaming. * Test update. * Add Call Connection Live Tests. * Add ServerCall Live Tests * Increase Test Coverage. * Reenable sample tests. * Address comments. * Point to swagger file in master branch. * Nit fix. * Nit changes based on Azure boarder review feedback.
| /// Calling server model factory | ||
| /// </summary> | ||
| [CodeGenModel("AzureCommunicationServicesModelFactory")] | ||
| internal partial class CallingServerModelFactory |
There was a problem hiding this comment.
this probably should be moved to .Models namespace and also should it be public so developers can instantiate the models that do not have public constructor.
CC: @minnieliu
There was a problem hiding this comment.
Yup, agreed, good catch Reza!
There was a problem hiding this comment.
Is this a pattern followed by other modalities? So, far we don't seem to have this need for apps
There was a problem hiding this comment.
Yes. See this for more details: https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking
| <PropertyGroup> | ||
| <Description> | ||
| This client library enables working with the Microsoft Azure Communication Service Calling Server APIs. | ||
| This client library enables working with the Microsoft Azure Communication CallingServer service. |
There was a problem hiding this comment.
Can we rename to Calling Server, two separate words?
There was a problem hiding this comment.
We prefer using "CallingServer" which was "Calling Server" to keep it consistent within SDK library and API
| /// </summary> | ||
| #pragma warning disable CA1707 // Identifiers should not contain underscores | ||
| V2021_04_15_Preview1 = 0 | ||
| V2021_06_15_Preview = 1 |
There was a problem hiding this comment.
why is the enum starting with 1 but the 2021_04_15 version is removed?
There was a problem hiding this comment.
This number started from 1 was per Azure boarder team suggest, they seems reserve 0 for other usage. CC @navali-msft
"2021_04_15" was a "private review" version. There are plenty of major schema changes on the swagger and since we are not public preview yet, we decide to have "V2021_06_15_Preview" as our first public version.
There was a problem hiding this comment.
| /// <param name="identifier"> The communication identifier. </param> | ||
| /// <param name="participantId"> Participant Id. </param> | ||
| /// <param name="isMuted"> Is participant muted. </param> | ||
| public CallParticipant(CommunicationIdentifier identifier, string participantId, bool? isMuted) |
| public string SourcePhoneNumber => GetRecordedVariable(AlternateCallerId, options => options.IsSecret()); | ||
|
|
||
| /// <summary> | ||
| /// The phone number associated with the source. |
There was a problem hiding this comment.
Should this be The phone number associated with the target.?
There was a problem hiding this comment.
Good catch!
Change it to:
/// The phone number required to make a pstn call.
| /// The phone number associated with the source. | ||
| /// </summary> | ||
| public string SourcePhoneNumber => GetRecordedVariable(AzurePhoneNumber, options => options.IsSecret()); | ||
| public string SourcePhoneNumber => GetRecordedVariable(AlternateCallerId, options => options.IsSecret()); |
There was a problem hiding this comment.
If we are going to change it to alternateCallerId, can we change the variable name as well?
There was a problem hiding this comment.
We prefer to using the SourcePhoneNumber in comparasion with TargetPhoneNumber
There was a problem hiding this comment.
We have target phone number, so here we have source phone number, considering later on, the source phone number could be a pstn number that is not from ACS resource, then we assign another number and differentiate it with the AlternateCallerId from ACS.
| /// </summary> | ||
| public class CallingServerTestEnvironment : CommunicationTestEnvironment | ||
| { | ||
| public const string AlternateCallerId = "ALTERNATE_CALLERID"; |
There was a problem hiding this comment.
@minnieliu @RezaJooyandeh
Should we move this to CommunicationTestEnvironment.cs and create a Variable in the ACS Live Test KV?
There was a problem hiding this comment.
We usually only add it to CommunicationTestEnvironment for variables that will be shared between all the Communication SDKs. I think it is fine to keep it in CallingServerTestEnvironment
| namespace Azure.Communication.CallingServer | ||
| { | ||
| [CodeGenModel("CommunicationErrorResponse")] | ||
| public partial class CallingServerErrorResponse |
There was a problem hiding this comment.
This class is not currently used, correct? If you plan to convert low level exceptions to this, you should only add this class when the conversion code is added. Otherwise, it is confusing
There was a problem hiding this comment.
Removed the public version. Keep the one generated by sdk.
…operties to readonly (#21980) * Updated models definition based on new swagger, also fixed events to make properties readonly * Update accessibility of internal models * Update the file path in autorest
…o feature/callingServer-preview1-enhancement
| EnvVars: | ||
| # SKIP_PHONENUMBER_LIVE_TESTS skips certain phone number tests such as purchase and release | ||
| SKIP_PHONENUMBER_LIVE_TESTS: TRUE No newline at end of file | ||
| SKIP_PHONENUMBER_LIVE_TESTS: TRUE |
There was a problem hiding this comment.
why is SKIP_PHONENUMBER_LIVE_TESTS here?
There was a problem hiding this comment.
I saw this flag is widely used in all the other communication SDK projects, even this flag is not used in them.
|
|
||
| using Azure.Core; | ||
|
|
||
| namespace Azure.Communication.CallingServer |
RezaJooyandeh
left a comment
There was a problem hiding this comment.
I left another couple of small comments, but feel free to merge once you address those and @minnieliu approve as well.
All SDK Contribution checklist:
This checklist is used to make sure that common guidelines for a pull request are followed.
Draftmode if it is:General Guidelines and Best Practices
Testing Guidelines
SDK Generation Guidelines
*.csprojandAssemblyInfo.csfiles have been updated with the new version of the SDK. Please double check nuget.org current release version.Additional management plane SDK specific contribution checklist:
Note: Only applies to
Microsoft.Azure.Management.[RP]orAzure.ResourceManager.[RP]Management plane SDK Troubleshooting
If this is very first SDK for a services and you are adding new service folders directly under /SDK, please add
new servicelabel and/or contact assigned reviewer.If the check fails at the
Verify Code Generationstep, please ensure:generate.ps1/cmdto generate this PR instead of callingautorestdirectly.Please pay attention to the @microsoft.csharp version output after running
generate.ps1. If it is lower than current released version (2.3.82), please run it again as it should pull down the latest version.Note: We have recently updated the PSH module called by
generate.ps1to emit additional data. This would help reduce/eliminate the Code Verification check error. Please run following command:Old outstanding PR cleanup
Please note:
If PRs (including draft) has been out for more than 60 days and there are no responses from our query or followups, they will be closed to maintain a concise list for our reviewers.